package io.renren.modules.canteens.dao;

import io.renren.common.dao.BaseDao;
import io.renren.modules.canteens.dto.SupplierDTO;
import io.renren.modules.canteens.entity.SupplierEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 供应商表
 *
 * @author 翟文闯 619556390@QQ.com
 * @since 1.0.0 2019-11-22
 */
@Mapper
public interface SupplierDao extends BaseDao<SupplierEntity> {

    @Select("SELECT * from canteens_supplier where supplier_name = '${supplierName}' ")
    SupplierDTO getSupplier(String supplierName);
    @Select("SELECT * from canteens_supplier where supplier_name like '%${supplierName}%' ")
    List<SupplierDTO> getLikeName(String supplierName);
}